<template>
  <el-container>
    <el-main class="main" id="main">
      <form-create v-model="$f" :rule="rule" @on-submit="onSubmit"></form-create>
    </el-main>
  </el-container>
</template>

<script>
import formCreate from '@form-create/element-ui'
export default {
  name: "Index",
  components:{

  },
  data () {
    return {
      //表单实例对象
      $f:{},
      //表单生成规则
      rule:[
        {
          type:'input',
          field:'goods_name',
          title:'商品名称'
        },
        {
          type:'datePicker',
          field:'created_at',
          title:'创建时间'
        }
      ]
    }
  },
  methods: {
    onSubmit(formData){
      alert("1111")
    }
  }
}

</script>
